package com.evil.common.application.dto.pkg;

import com.evil.common.application.dto.SourceDTO;
import com.evil.common.application.enums.ApplicationSourceTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PackageApplicationSourceDTO extends SourceDTO {

    private Boolean filterDeleted;

    public PackageApplicationSourceDTO() {
        this.filterDeleted = true;
    }

    public PackageApplicationSourceDTO(SourceDTO sourceDTO) {
        super(sourceDTO.getSourceType(), sourceDTO.getSourceId());
        this.filterDeleted = true;
    }

    public PackageApplicationSourceDTO(ApplicationSourceTypeEnum sourceTypeEnum, Long sourceId) {
        super(sourceTypeEnum.getId(), sourceId);
        this.filterDeleted = true;
    }
}
